﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Things.Bar.Models;
using Things.Bar;

namespace Things.Web.Bar
{
    public partial class AddNoticeType : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            NoticeType type = new NoticeType();
            type.Id = Guid.NewGuid();
            type.Caption = _ctlEditCaption.Text;
            if (new NoticeTypeRepository().Restore(type))
            {
                Response.Redirect("./NoticeTypeList.aspx");
            }
            else
            {
            }
        }

        protected void _ctlBtnBack_Click(object sender, EventArgs e)
        {
            Response.Redirect("./NoticeTypeList.aspx");
        }
    }
}